package com.aabte.lota.auth.common.config;

import com.aabte.commons.encrypt.rsa.EncryptorRSAFactory;
import com.aabte.commons.encrypt.rsa.RSAPrivateKeyEncryptor;
import com.aabte.commons.encrypt.rsa.RSAPublicKeyEncryptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Daniel
 * @version 1.0
 * @date 2020/4/5
 */
@Configuration
public class EncryptorConfig {

  @Bean
  public RSAPrivateKeyEncryptor rsaPrivateKeyEncryptor() {
    return EncryptorRSAFactory.getPrivateEncryptor();
  }

  @Bean
  public RSAPublicKeyEncryptor rsaPublicKeyEncryptor() {
    return EncryptorRSAFactory.getPublicEncryptor();
  }
}
